package br.edu.unifei.mestrado.kl.util;

import br.edu.unifei.mestrado.commons.graph.NodeWrapper;

public class PairGain {

	private NodeWrapper i;
	private NodeWrapper j;
	private int gain;
	private int actualGain;

	public PairGain() {
	}

	public PairGain(PairGain newPairGain) {
		i = newPairGain.getI();
		j = newPairGain.getJ();
		gain = newPairGain.getGain();
		actualGain = newPairGain.getActualGain();
	}

//	public PairGain(NodeWrapper newi, NodeWrapper newj, int newgain, int newactualGain) {
//		i = newi;
//		j = newj;
//		gain = newgain;
//		actualGain = newactualGain;
//	}

	public NodeWrapper getI() {
		return i;
	}

	public void setI(NodeWrapper i) {
		this.i = i;
	}

	public NodeWrapper getJ() {
		return j;
	}

	public void setJ(NodeWrapper j) {
		this.j = j;
	}

	public int getGain() {
		return gain;
	}

	public void setGain(int gain) {
		this.gain = gain;
	}

	public int getActualGain() {
		return actualGain;
	}

	public void setActualGain(int actualGain) {
		this.actualGain = actualGain;
	}

	@Override
	public String toString() {
		return "PairGain [i=" + i.getId() + ", j=" + j.getId() + ", g=" + gain + ", ag=" + actualGain + "]";
	}

	public String toHumanString() {
		return getI().getId() + ":" + getJ().getId() + " gain: " + getGain() + "|" + getActualGain();
	}

}
